@echo off
cls

set Server=waBISQL1
set DBName=msdb
set Scripts=C:\BIMonitor\SQL\MSDB\


echo The Agent job SQL scripts are executing . . . . 
echo .



rem create Agent jobs
sqlcmd -E -S %Server% -d %DBName% -i "%Scripts%Jobs\BIMonitor - SQL Job Monitor.sql"
sqlcmd -E -S %Server% -d %DBName% -i "%Scripts%Jobs\BIMonitor - SSIS Log Monitor.sql"
sqlcmd -E -S %Server% -d %DBName% -i "%Scripts%Jobs\BIMonitor - System Health Monitor.sql"


echo .
echo .
echo The SQL scripts creating the MSDB monitoring objects has completed.  Errors (if any) are listed above.
echo .
echo .
echo .
pause
